home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- # Make sure the argument count is correct
- if [ $# != 1 ] ; then
- echo Usage: chkLicese execuatableName
- exit 1
- fi
-
- cd /tmp
- LS=/usr/bin/ls
-
- ADOBE_LICENSE_DIR=/usr/adobe/AdobeLicense
- export ADOBE_LICENSE_DIR
- adobeApp=$1
- # retrieve path name of this executable
- executable=`which $1`
-
-
- if [ $? = 0 ] ; then
- longlist=`$LS -l $executable`
- test -l $executable
- if [ $? = 0 ] ; then
- abspath=`$LS -l $executable | awk '/bin/ { print $11 }'`
- else
- abspath=$executable
- fi
-
- scriptdir=`expr $abspath : '\(.*\)/'`
-
- num=`expr $scriptdir : ".*/bin"`
-
- if [ "$num" -gt 0 ] ; then
- binpath=`expr $scriptdir : '.*/\(.*\)/bin'`
- else
- binpath=`expr $scriptdir : '.*/\(.*\)'`
- fi
-
- numchar=`expr $adobeApp : ".*"`
-
- i=1
- ver=$binpath
- while [ "$i" -le "$numchar" ]
- do
- ver=`echo $ver | sed 's/.//'`
- i=`expr $i + 1`
- done
-
-
- # invoke adobeLicense to verify that the user has
- # accepted the license agreement stuff
- adobeLicense $adobeApp $ver
-
- else
- # This executable is not existed in the system
- echo "No such executable: "$1" on the system"
- fi
-